//
//  BannerRootClass.m
//  LCOnePsychology
//
//  Created by li cheng on 16/09/01
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "BannerRootClass.h"
#import "BannerData.h"

@implementation BannerRootClass
//
+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [BannerData class]};
}
// 重写 setValue 方法
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<BannerData *> *mArray = [NSMutableArray array];
        for (NSDictionary *dic in _data) {
            BannerData *bannerData = [BannerData modelDic:dic];
            [mArray addObject:bannerData];
        }
        _data = mArray;
    }
}
@end
